


** solar module price index from Bloomberg New Energy Finance


* Input:
* OrigData/BNEF/BNEF_SSPSMOCO_09_18.xlsx"


* Output:
* Data/BNEF_module_quarter.dta
* Data/BNEF_module_month.dta



clear 

import excel using "OrigData/BNEF/BNEF_SSPSMOCO_09_18.xlsx"

drop if A==.

rename A date
rename B moduleprice

gen contract_quarter = qofd(date)
format contract_quarter %tq

collapse (mean) moduleprice , by(contract_quarter)

save Data/BNEF_module_quarter.dta, replace





clear 

import excel using "OrigData/BNEF/BNEF_SSPSMOCO_09_18.xlsx"

drop if A==.

rename A date
rename B moduleprice

gen contract_start_month = mofd(date)
format contract_start_month %tm

collapse (mean) moduleprice , by(contract_start)

save Data/BNEF_module_month.dta, replace
